<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Bel_Forms_Validator</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Bel_Forms_Validator</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Form validation class. Validates form fields' using Zend_Validate.</p>
<p class="description"><p>Forms are described in xml files. This class makes php validation  and builds js code for client side validation.  (jQuery library http://bassistance.de/jquery-plugins/jquery-plugin-validation/ should be used)  To link srver side rule name and cliend side rule names config/validator.ini file is used.</p></p>
	<ul class="tags">
				<li><span class="field">author:</span> Konstantin Shamko &lt;<a href="mailto:konstantin.shamko@gmail.com">konstantin.shamko@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> 0.0.1</li>
				<li><span class="field">copyright:</span> Copyright (c) 2009 Konstantin Shamko</li>
				<li><span class="field">license:</span> New</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_Libs---Bel---Forms---Validator.php.html">/Libs/Bel/Forms/Validator.php</a> (line <span class="field">17</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																				
												<div class="method-definition">
											<span class="method-result">Bel_Forms_Validator</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$rule_path</span> = <span class="var-default">''</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#generateValidateJS" title="details" class="method-name">generateValidateJS</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$formname</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#getErrors" title="details" class="method-name">getErrors</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#validate" title="details" class="method-name">validate</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$formname</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$to_validate</span>)
									</div>
								</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">45</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class constructor. Sets path to the rules dir</p>
	
	<div class="method-signature">
		<span class="method-result">Bel_Forms_Validator</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$rule_path</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$rule_path</span><span class="var-description">: - path to the rules dir. Will be set to a defaul value if empty.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgenerateValidateJS" id="generateValidateJS"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">generateValidateJS</span> (line <span class="line-number">109</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Generates js validation code based on jquery.validate.js library</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			generateValidateJS
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$formname</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$formname</span><span class="var-description">: - name of the validated form</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetErrors" id="getErrors"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getErrors</span> (line <span class="line-number">153</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class getter. It is needed to get validation errors</p>
	<ul class="tags">
				<li><span class="field">return:</span> - array with errors</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			getErrors
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodvalidate" id="validate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">validate</span> (line <span class="line-number">61</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Call this to validate a form</p>
	<ul class="tags">
				<li><span class="field">return:</span> - true(if ok)/false (if suxxx)</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			validate
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$formname</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$to_validate</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$formname</span><span class="var-description">: - name of a validated form</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$to_validate</span><span class="var-description">: - request array to validate</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Mon, 01 Mar 2010 18:58:53 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.0</a>
	</p>
	</div></body>
</html>